<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script src="../js/jquery.js"></script>
<script>
	$(document).ready(function(){
		$("#get").click(function(){
			$.get("/practice.jQuery/AjaxServlet",function(data,status){
				alert("Data: " + data + "\nStatus: " + status);
			});
		});
		$("#post").click(function(){
			$.post("/practice.jQuery/AjaxServlet",
			{
				name:"My Name",
				city:"Some City"
			},
			function(data,status){
				alert("Data: " + data + "\nStatus: " + status);	
			});
		});
	});
</script>
<title>Get and Post</title>
</head>
<body>
<button id="get">Send AJAX get request</button>
<button id="post">Send AJAx post request</button>
</body>
</html>